Skip to content

Simplify, tidy, and improve gitignore.py - #3

Open
sijk wants to merge 4 commits into
adamlilienfeldt:masterfrom
sijk:master
Open

Simplify, tidy, and improve gitignore.py#3
sijk wants to merge 4 commits into
adamlilienfeldt:masterfrom
sijk:master

Conversation

@sijk

@sijk sijk commented Jan 11, 2013

Copy link
Copy Markdown

I haven't changed any externally visible functionality, but I have greatly simplified the implementation.

  • Read the list of boilerplate files from disk
  • Removed a bunch of duplicate code
  • Removed hard-coded paths

It should now be easier to maintain this package since you won't have to update the list in gitignore.py (4 times!!) if you add/remove any boilerplate files.

sijk added 2 commits January 12, 2013 01:05
- Read list of available boilerplates from subdirectory
  - Easier to maintain

- Don't inherit sublime.Window
  - This is a WindowCommand, not a Window

- Removed duplicate code
  - first_select, second_select
  - 4 occurrences of essentially the same list

- Removed hard-coded paths
Hmm... this repo needs a .gitignore! :-P
Comment thread gitignore.py Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On ST2 using Windows, this returns .\boilerplates, and causes line 10 to fail. It returns the full path in ST3 though (I'm currently making the plugin compatible with ST3)

sijk added 2 commits March 6, 2013 13:01
Apparently using a relative path doesn't work on Windows.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants